Inferring Parametric Energy Consumption Functions at Different Software Levels: ISA vs. LLVM IR
نویسندگان
چکیده
The static estimation of the energy consumed by program executions is an important challenge, which has applications in program optimization and verification, and is instrumental in energy-aware software development. Our objective is to estimate such energy consumption in the form of functions on the input data sizes of programs. We have developed a tool for experimentation with static analysis which infers such energy functions at two levels, the instruction set architecture (ISA) and the intermediate code (LLVM IR) levels, and reflects it upwards to the higher source code level. This required the development of a translation from LLVM IR to an intermediate representation and its integration with existing components, a translation from ISA to the same representation, a resource analyzer, an ISA-level energy model, and a mapping from this model to LLVM IR. The approach has been applied to programs written in the XC language running on XCore architectures, but is general enough to be applied to other languages. Experimental results show that our LLVM IR level analysis is reasonably accurate (less than 6.4% average error vs. hardware measurements) and more powerful than analysis at the ISA level. This paper provides insights into the trade-off of precision versus analyzability at these levels.
منابع مشابه
Energy Consumption Analysis and Verification by Transformation into Horn Clauses and Abstract Interpretation∗
The static estimation of the energy consumed by program executions has applications in program optimization and verification, and is instrumental in energy-aware software development. We describe our approach for estimating such energy consumption statically (i.e., at compile-time, without running the program) in the form of functions on the input data sizes of procedures (and possibly other ha...
متن کاملStrato: A Retargetable Framework for Low-Level Inlined-Reference Monitors
Low-level Inlined Reference Monitors (IRM) such as control-flow integrity and software-based fault isolation can foil numerous software attacks. Conventionally, those IRMs are implemented through binary rewriting or transformation on equivalent low-level programs that are tightly coupled with a specific Instruction Set Architecture (ISA). Resulting implementations have poor retargetability to d...
متن کاملOn the Value and Limits of Multi-level Energy Consumption Static Analysis for Deeply Embedded Single and Multi-threaded Programs
There is growing interest in lowering the energy consumption of computation. Energy transparency is a concept that makes a program’s energy consumption visible from software to hardware through the different system layers. Such transparency can enable energy optimizations at each layer and between layers, and help both programmers and operating systems make energy aware decisions. The common me...
متن کاملParametric Study of the Impact of Windows to Wall Ratio on Reduction of Energy Consumption and Environmental Impact of a Zero-Energy Building in Different Orientations
Nowadays, the increase of fossil fuel consumption intensifies the crucial role of architects. As buildings consume over one-third of the used energy, the society of architects is held responsible for this consumption. Therefore, the amount of energy used by a building is directly related to its design; meaning that reduction of energy consumption should be targeted at the design stage. In this ...
متن کاملMetamorphic Code from LLVM IR Bytecode
Metamorphic software changes its internal structure across generations with its functionality remaining unchanged. Metamorphism has been employed by malware writers as a means of evading signature detection and other advanced detection strategies. However, code morphing also has potential security benefits, since it can serve to increase the “genetic diversity” of software. We have created a me...
متن کامل